<!--
 * @Author: 陈焕杰
 * @Date: 2020-06-28 14:00:42
 * @LastEditTime: 2020-07-08 10:21:24
 * @LastEditors: Please set LastEditors
 * @Description: 我的订单
 * @FilePath: \mobile_project\src\pages\user\orders\orders.vue
--> 

<template>
  <div class="orders">
    <van-nav-bar title="我的订单" left-text="返回" left-arrow fixed placeholder @click-left="goback" />

    <van-tabs v-model="active" sticky>
      <van-tab title="全部">
        <all></all>
      </van-tab>
      <van-tab title="待付款">
        <paid></paid>
      </van-tab>
      <van-tab title="待发货">
        <shipped></shipped>
      </van-tab>
      <van-tab title="配送中">
        <delivery></delivery>
      </van-tab>
      <van-tab title="售后中">
        <after-sale></after-sale>
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
import all from "./components/all";
import paid from "./components/paid";
import shipped from "./components/shipped";
import delivery from "./components/delivery";
import afterSale from "./components/afterSale";
export default {
  data() {
    return {
      active: 0
    };
  },
  components:{
    all,
    paid,
    shipped,
    delivery,
    afterSale
  },
  methods: {
    goback() {
      this.$router.go(-1); //返回上一页
    }
  },
  activated(){
    this.active = this.$route.query.active
  }
};
</script>

<style lang="scss" scoped>
@import "@/style/my/orders/orders";
</style>